﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainFrm.aspx.cs" Inherits="WebApp.MainFrm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>广州市盈泓货运代理有限公司业务查询系统</title>
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.3.2/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.3.2/themes/icon.css">

    <script type="text/javascript" src="js/common.js"></script>

    <script type="text/javascript" src="js/jquery-easyui-1.3.2/jquery-1.8.0.min.js"></script>

    <script type="text/javascript" src="js/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>

    <script type="text/javascript">
        //        $(function() {
        //            $('#tabs').tabs({
        //                onLoad: function(panel) {
        //                    var plugin = panel.panel('options').title;
        //                    //dp.SyntaxHighlighter.ClipboardSwf = '/SyntaxHighlighter/Scripts/clipboard.swf';
        //                    //dp.SyntaxHighlighter.HighlightAll('code-' + plugin);
        //                }
        //            });
        //        });

        function open1(plugin) {
            if ($('#tabs').tabs('exists', plugin)) {
                $('#tabs').tabs('select', plugin);
            } else {
                $('#tabs').tabs('add', {
                    title: plugin,
                    href: plugin + '.aspx',
                    closable: true,
                    extractor: function(data) {
                        var tmp = $('<div></div>').html(data);
                        data = tmp.find('#content').html();
                        tmp.remove();
                        return data;
                    }
                });
            }
        }

        $(function() {
            //InitLeftMenu();
            $('body').layout();
        })

        function InitLeftMenu() {
            $('.easyui-accordion li a').click(function() {
                var tabTitle = $(this).text();
                var url = $(this).attr("href");
                addTab(tabTitle, url);
                $('.easyui-accordion li div').removeClass("selected");
                $(this).parent().addClass("selected");
            }).hover(function() {
                $(this).parent().addClass("hover");
            }, function() {
                $(this).parent().removeClass("hover");
            });
        }

        function addTab(subtitle, url) {
            if (!$('#tabs').tabs('exists', subtitle)) {
                $('#tabs').tabs('add', {
                    title: subtitle,
                    content: createFrame(url),
                    closable: true,
                    width: $('#mainPanle').width() - 10,
                    height: $('#mainPanle').height() - 26
                });
            } else {
                $('#tabs').tabs('select', subtitle);
            }
        }

        function createFrame(url) {
            var s = '<iframe name="mainFrame" scrolling="no" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>';
            return s;
        }
    </script>

</head>
<body class="easyui-layout" style="text-align: left">
    <div region="north" border="false" style="background: #666; text-align: center">
        <div id="header-inner">
            <table height="49" border="0" cellspacing="0" cellpadding="0" width="100%" class="font_size"
                style="background-image: url(images/headerBg.jpg); background-repeat: repeat;">
                <tr>
                    <td>
                        <img src="images/header1.jpg" style="border: 0px" alt="" />
                    </td>
                    <td style="vertical-align: bottom; color: #ffffff">
                        <span id="spanUserName" runat="server"></span>【<span id="spanRoleName" runat="server"></span>】欢迎您!
                        &nbsp;&nbsp;<a href="javascript:addTab('密码重置', 'ResetPwdFrm.aspx')" style="color: #ffffff">修改密码</a>
                        &nbsp;<a href="logout.aspx" style="color: #ffffff">注销登录</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div region="west" border="false" split="true" title="系统菜单" style="width: 250px;
        padding: 5px;">
        <div class="easyui-accordion" style="width: 230px; height: auto;" id="menuDiv" runat="server">
            <div title="About" data-options="iconCls:'icon-ok'" style="overflow: auto; padding: 10px;">
                <h3 style="color: #0099FF;">
                    Accordion for jQuery</h3>
                <p>
                    Accordion is a part of easyui framework for jQuery. It lets you define your accordion
                    component on web page more easily.</p>
            </div>
            <div title="TreeMenu" data-options="iconCls:'icon-search'" style="padding: 10px;">
                <ul class="easyui-tree">
                    <li><span><a href="#" onclick="addTab('OrderFrm','OrderFrm.aspx')">OrderFrm</a></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div region="center" border="false" id="mainPanle" style="overflow: hidden;">
        <div id="tabs" class="easyui-tabs" fit="true" border="false" plain="true">
            <div title="主页" style="padding: 20px; text-align: center; background: url(images/bg.jpg)"
                id="home">
                <center style="color: White; font-size: 30px; font-weight: bold;">
                    欢迎使用盈泓业务管理系统</center>
            </div>
        </div>
    </div>
</body>
</html>
